/******************************************************************************
*
*               Copyright Mentor Graphics Corporation 2003
*                           All rights reserved
*
*   THIS WORK CONTAINS TRADE SECRETS AND PROPRIETARY INFORMATION WHICH IS
*    THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS
*                        SUBJECT TO LICENSE TERMS
*
*******************************************************************************

*******************************************************************************
*
* FILE NAME                                                          VERSION
* act_test.h                                                                1.1
*
* COMPONENT
* ANSI/ISO C test application
*
* DESCRIPTION
* Main include file for all C-code demo applications. This file is used to
* select what tests / demonstrations are to be run using definitions below
* DATA STRUCTURES
*
*
* FUNCTIONS
* void Main_Entry(void)
* int test_generic(int value)
*
* DEPENDENCIES
* 
******************************************************************************/


#ifndef ACT_TEST_H
#define ACT_TEST_H


/******************************************************************************
* IMPORTANT STARTUP CODE NOTES:
* 
* 1) Boot Code
*    Either a 'int.s' file, or some other vendor supplied bootstrap file
*    that initializes the board, clears the bss segment, and copies rom to ram
*    must be present in the compiled project.
*    It is assumed that this boot code then calls act_target_startup
* 
* 2) act_target_startup:  
*    The function that starts all the tests on a particular board (calls the
*    ansi_c_test function) goes into an endless loop when first started.
*    A generic version of this function is provided in act_target_generic.c
******************************************************************************/


void Main_Entry(void);		        /* Main entry point */
int test_generic(int value);		/* entry point for all the tests */

/* The following definitions are to be switched to 1 for inclusion
   of the specified test in the compiled code or 0 otherwise  */

#define ALL_TESTS  1			    /* Set to 1 to run all tests */
 
#if (!ALL_TESTS)
	/* select whatever specific tests you want*/
     #define ACT_ARRAY_TYPES_TEST                   0
     #define ACT_FUNDAMENTAL_TYPES_TEST             0
     #define ACT_STRUCT_DECLARATION_TEST            0
     #define ACT_LOCAL_FUNDAMENTAL_ARRAY_TEST       0
     #define ACT_ENUM_TEST                          0
     #define ACT_CALL_STACK_TEST                    0
     #define ACT_SCOPE_RULES_TEST                   0
     #define ACT_INLINE_FUNCTION_TEST               0
     #define ACT_STRUCT_POINTER_CHAIN_TEST          0
     #define ACT_FUNCTION_POINTER_TEST              0

#else

     #define ACT_ARRAY_TYPES_TEST                   1
     #define ACT_FUNDAMENTAL_TYPES_TEST             1
     #define ACT_STRUCT_DECLARATION_TEST            1
     #define ACT_LOCAL_FUNDAMENTAL_ARRAY_TEST       1
     #define ACT_ENUM_TEST                          1
     #define ACT_CALL_STACK_TEST                    1
     #define ACT_SCOPE_RULES_TEST                   1
     #define ACT_INLINE_FUNCTION_TEST               1
     #define ACT_STRUCT_POINTER_CHAIN_TEST          1
     #define ACT_FUNCTION_POINTER_TEST              1
#endif

/* ARMCC compiler specific directives */
#ifdef __arm
  #define inline __inline
#endif

#if (ACT_STRUCT_POINTER_CHAIN_TEST)
extern int act_struct_pointer_chain_test(int value);
#endif

#if (ACT_INLINE_FUNCTION_TEST)
extern int act_inline_function_test(int value);
#endif

#if (ACT_FUNCTION_POINTER_TEST)
extern int act_function_pointer_test(int value);
#endif

#if (ACT_ARRAY_TYPES_TEST)
extern int act_array_types_test(int value);
#endif

#if (ACT_FUNDAMENTAL_TYPES_TEST)
extern int act_fundamental_types_test(int value);
#endif

#if (ACT_STRUCT_DECLARATION_TEST)
extern int act_struct_declaration_test(int value);
#endif

#if ACT_LOCAL_FUNDAMENTAL_ARRAY_TEST
extern int act_local_fundamental_array_test(int value);
#endif

#if (ACT_ENUM_TEST)
extern int act_enum_test(int value);
#endif

#if (ACT_CALL_STACK_TEST)
extern int act_call_stack_test(int value);
#endif

#if (ACT_SCOPE_RULES_TEST)
extern int act_scope_rules_test(int value);
#endif

#endif
